import service from "@/api/index.js";
const orderApi={
    insert(orderVo) {
        return service.post("/order/insert", orderVo);
    },
    selectById(id){
        return service.get(`/order/${id}`)
    },
    selectById1(orderId) {
        return service.get(`order/select/${orderId}`);
    },
    //分页搜索
    selectByPage(condition,pageNum,pageSize){
        condition.pageNum = pageNum;
        condition.pageSize = pageSize;
        return service.get("/order/selectAll",{
            params:condition
        });
    },
    harvest(order) {
        return service.put("/order/harvest", order)
    },
    selectNameById(id){
        return service.get(`/order/name/${id}`)
    },
    selectByUserId(pageNum, pageSize) {
        return service.get("/order/selectByUserId", {
            params: {
                pageNum: pageNum,
                pageSize: pageSize
            }
        })
    },
    pay(orderVo) {
        return service.post("/order/pay", orderVo);
    },
    send(order) {
        return service.put("/order/send", order)
    }
}
export default orderApi;